/*
 * CreateDemo.h
 *
 *  Created on: 2011-8-10
 *      Author: hywie
 */

#ifndef CREATEDEMO_H_
#define CREATEDEMO_H_

#include "DBClass.h"

#include "ClientClass.h"

#include "SessionDemo.h"

#include <pthread.h>

#define PORT 5000		//端口号

#define MAX_CLIENT_NUM 10	//最大监听数

using namespace std;

void createSocket(DBClass *db);	//建立套接字并与服务器绑定

void listenSocket(ClientClass *newClient);	//监听套接字,处理客户端请求

void radioFunc(int sock_fd, struct def_msg msg);	//向指定套接字(sock_fd)发送一条消息

#endif /* CREATEDEMO_H_ */
